/*=============================================================
(c) 2012 by Juliano Efson Sales
www.mdcc.ufc.br
================================================================*/

using System.Threading;

namespace HPE.Test{
   
   public class WriterUnit {

      protected string msg;
      protected int count;
      protected bool resultCond;

      public WriterUnit(string msg, int count, bool resultCond) {
         this.msg = msg;
         this.count = count;
         this.resultCond = resultCond;
      }

      public void Write() {
         
         for(int i=0; i < count; i++) {
            System.Console.WriteLine(msg);
            Thread.Sleep(2000); //2 sec.
         }
      }

      public void Count() {
         
         for(int i=0; i < count*3; i++) {
            System.Console.WriteLine("Count: " + msg +  i);
            Thread.Sleep(400);
         }
      }
   }
   
   
}
